﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SynchronousDispatcher.cs" company="JDML Consulting Ltd.">
//   Copyright 2011 Photon Project - http://photon.codeplex.com
// </copyright>
// <summary>
//   Defines the SynchronousDispatcher type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Photon.Testing.Threading
{
    using System;

    public class SynchronousDispatcher : IAsynchronousTestDispatcher
    {
        public void SendOrPost(Action a)
        {
            a();
        }

        public void SendOrPost(Delegate d, params object[] args)
        {
            d.DynamicInvoke(args);
        }

        public bool CheckAccess()
        {
            return false;
        }
    }
}